//
// Created by wze-zero on 2024/9/8 008.
//
#include <iostream>

using namespace std;

int main() {
    string s;
    int num, sum = 0;
    cin >> s;
    for (int i = 0, n = 1; i < s.size() - 1; ++i) {
        if (s.at(i) != '-') {
            num = stoi(to_string(s.at(i))) - 48;
            sum += num * n;
            n++;
        }
    }
    if (sum % 11 < 10 && sum % 11 == stoi(to_string(s.at(s.size() - 1))) - 48) {
        cout << "Right" << endl;
    } else if (sum % 11 == 10 && s.at(s.size() - 1) == 'X') {
        cout << "Right" << endl;
    } else {
        if (sum % 11 != 10) {
            s.at(s.size() - 1) = char(sum % 11 + 48);
        } else {
            s.at(s.size() - 1) = 'X';
        }
        cout << s << endl;
    }
    return 0;
}